<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>add a image to Product</title>
</head>
<link rel="stylesheet" type="text/css" href="css/main.css" />
	<script type='text/javascript' src='js/prototype.js'></script>
	<script type='text/javascript' src='js/sha1.js'></script>
	<script type='text/javascript'>
	function start(){
		var request =
		{
		    QueryString : function(val)
		    {
		        var uri = window.location.search;
		        var re = new RegExp("" +val+ "=([^&?]*)", "ig");
		        return ((uri.match(re))?(uri.match(re)[0].substr(val.length+1)):null);
		    }
		};
		var productId=request.QueryString("productId");
		document.getElementById("target").action="addOneProductImage?productId="+productId;
	}
	</script>
<body onload="start()">
<div class="topbar">
<ul class="horizon">
	<li style="margin-left:50%;margin-top:2px;" class="logo">
	<a href="login.html">首页</a>
	</li>
	<li class="login" id="login">
		<form method="post">
				<input type="text" id="visitorName" onclick="clear()" value="用户名" name="visitorName" />
				<input type="password" id="password" name="password" />
				<input type="button" value="login" onclick="login()"/>
		</form>
	</li>
</ul>
</div>
<div class="main">
	<ul class="horizon">
		<li>
			<ul class="vertical">
				<li class="managePad">
					<ul class='vertical' style="margin-left: 100px;">
						<li>
						<a href="./addProduct.html">add product</a>
						</li>
					</ul>
				</li>
			</ul>
		<li class="content">
			<form id="target" action="" method = "post" enctype="multipart/form-data">
			<input type="file" name="upload"/>
			<input type="submit" value="insert"/>
			</form>
		</li>
	</ul>
</div>
</body>
</html>